import {BaseEntity, Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, RelationId} from 'typeorm';

@Entity('fa_cms_special', {schema: 'fastadmin' } )
export class fa_cms_special {

    @PrimaryGeneratedColumn({
        type: 'int',
        name: 'id',
        })
    id: number;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'title',
        })
    title: string;

    @Column('varchar', {
        nullable: true,
        name: 'tag_ids',
        })
    tag_ids: string | null;

    @Column('enum', {
        nullable: true,
        name: 'flag',
        })
    flag: string | null;

    @Column('varchar', {
        nullable: false,
        length: 50,
        name: 'label',
        })
    label: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'image',
        })
    image: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'banner',
        })
    banner: string;

    @Column('varchar', {
        nullable: false,
        length: 50,
        name: 'diyname',
        })
    diyname: string;

    @Column('varchar', {
        nullable: true,
        length: 100,
        name: 'keywords',
        })
    keywords: string | null;

    @Column('varchar', {
        nullable: true,
        name: 'description',
        })
    description: string | null;

    @Column('varchar', {
        nullable: true,
        name: 'intro',
        })
    intro: string | null;

    @Column('int', {
        nullable: true,
        default: () => '\'0\'',
        name: 'views',
        })
    views: number | null;

    @Column('int', {
        nullable: true,
        default: () => '\'0\'',
        name: 'comments',
        })
    comments: number | null;

    @Column('int', {
        nullable: true,
        name: 'createtime',
        })
    createtime: number | null;

    @Column('int', {
        nullable: true,
        name: 'updatetime',
        })
    updatetime: number | null;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'template',
        })
    template: string;

    @Column('enum', {
        nullable: false,
        default: () => '\'normal\'',
        enum: ['normal', 'hidden'],
        name: 'status',
        })
    status: string;

}
